<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table{
            border-collapse: collapse;
        }
    </style>
</head>
<body>
<form action="{% url 'news:add' %}" method="post">
    {% csrf_token %}
    <table>
        <tr>
            <td>新闻标题</td>
            <td>
                <input type="text" name="name">
            </td>
        </tr>
        <tr>
            <td>新闻内容</td>
            <td>
                <input type="text" name="nr">
            </td>
        </tr>
        <tr>
            <td>新闻分类</td>
            <td>
                <select name="fl" >
                    {% for i in data %}
                        <option value="{{ i.id }}">{{ i.name }}</option>
                    {% endfor %}
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="提交">
            </td>
        </tr>
    </table>
</form>

</body>
</html>